<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <body>
        <f:view beforePhase="#{surveyBeanManage.displaySurvey}">
            <ui:composition template="./template.xhtml">
                <ui:define name="top">
                    top
                </ui:define>
                <ui:define name="left">
                    left
                </ui:define>
                <ui:define name="content">
                    <h:form>
                    <h:dataTable value="#{surveyBeanManage.surveys}" var="survey">
                        <h:column>
                            <h:outputText value="Chu de : #{survey.contentSurvey}"/>
                            <h:dataTable value="#{survey.question}" var="question">
                                <h:column>
                                    <h:outputText value="#{question.id}."/>
                                    <h:outputText value="#{question.content}"></h:outputText>
                                    <h:dataTable value="#{question.answers}" var="answer">
                                        <h:column>
                                            <h:selectBooleanCheckbox value="#{answer.checked}"></h:selectBooleanCheckbox><h:outputText value="#{answer.number}."/><h:outputText value="#{answer.option}    "/>
                                        </h:column>
                                    </h:dataTable>
                                </h:column>
                            </h:dataTable>
                        </h:column>
                    </h:dataTable>
                        <h:commandLink action="#{surveyBeanManage.display}">Submit</h:commandLink>
                        </h:form>
                </ui:define>
                <ui:define name="bottom">
                    bottom
                </ui:define>
            </ui:composition>
        </f:view>
    </body>
</html>
